第二个进程


意向共享锁


begin; 3

4

select * from 
	admin_user 
where user_id = 1 lock in share mode; 



6
update admin_user set user_name = '2oo' where user_id = 1;


commit;


show variables like '%iso%';

局 @@session
全 @@global

set @@session.tx_isolation = 'READ-COMMITTED';
set @@session.tx_isolation = 'REPEATABLE-READ';


select * from count;






begin;

select * from count 
where prefix = 'dz10021' 
for update;;

update count set count = 22
where  prefix = 'dz10021';




commit;






start transaction;

select * from count 
where prefix = '222'
for update;

insert into count values
('222', 0 , 0);

commit;




select * from count 
where prefix = 'dd';

